Open
Conversation
562a2c7 to
eef0969
Compare
Collaborator
3db5c2a to
83314d8
Compare
Member
Author
|
Thanks @MarioCadenas, sorry for failing tests, I broke them accidentally due to some recent changes. Fixed now: 2bf8d01 |
ce8bfbe to
9a6575b
Compare
# Conflicts: # docs/docs/api/appkit/index.md # docs/docs/api/appkit/typedoc-sidebar.ts # packages/appkit/package.json
9a6575b to
40b6c1b
Compare
d52e7a2 to
62aecae
Compare
pkosiec
commented
Feb 17, 2026
| const poolConfig = getLakebasePgConfig(userConfig, telemetry, logger); | ||
| const pool = new pg.Pool(poolConfig); | ||
|
|
||
| initTelemetry() |
Collaborator
There was a problem hiding this comment.
yeah this seems like very prone to errors 🤣 let's see if we can make it work with require given the ESM restriction, and if not I don't know if we should just add it as a dependency then? (I don't like having it as a mandatory dep but I guess it would be more reliable than this)
| })(); | ||
| } | ||
|
|
||
| await loadPromise; |
Collaborator
There was a problem hiding this comment.
why don't we just do
Suggested change
| await loadPromise; | |
| try { | |
| otelApi = await import("@opentelemetry/api"); | |
| } catch { | |
| otelApi = null; // Mark as failed | |
| } | |
| } |
the require system will take care of not importing the same module twice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Intro
Works with Lakebase Autoscaling
Supports OAuth authentication and automatic token refresh
WorkspaceClientfromdatabricks-sdk-jsfor authentication (client credentials flow / reusing existingDATABRICKS_TOKEN)/api/2.0/postgres/credentialswith the constructed endpoint of formatprojects/{project-id}/branches/{branch-id}/endpoints/{endpoint-id}generate_database_credential: https://github.com/databricks/databricks-sdk-py/blob/a0b75908723f874fbf1659962df49ad57d3afe6a/databricks/sdk/service/postgres.py#L1808It’s a wrapper over the
pg.Pool: it means it works with any PostgreSQL databaseCompatible with popular TypeScript/JavaScript ORMs
Implementation aligned with Theo's Apps Runtime design doc
Driver separation
@opentelemetry/apiis used directly to work in both cases (standalone driver, or a driver as a part of AppKit app)Decisions: https://docs.google.com/document/d/13WTwiqCmfDlxzBRs6uOlGBtJ3f0qENw4uakK4cfkbg8/edit?tab=t.0#heading=h.q1mzydwk9pms
Resolves: https://databricks.atlassian.net/browse/LKB-9399
Additional notes:
Telemetry was tested locally:

The playground examples still work as before:

Related document
https://docs.google.com/document/d/13WTwiqCmfDlxzBRs6uOlGBtJ3f0qENw4uakK4cfkbg8/edit?tab=t.0
https://databricks.atlassian.net/browse/LKB-9058